package com.example.spring_mysql.configuration

import com.example.spring_mysql.interceptor.CustomAuthFilter
import org.springframework.boot.web.servlet.FilterRegistrationBean
import org.springframework.context.annotation.Bean
import org.springframework.context.annotation.Configuration


@Configuration
class FilterConfig {
//    @Bean
//    fun myFilter(): FilterRegistrationBean<CustomAuthFilter> {
//        val registration: FilterRegistrationBean<CustomAuthFilter> = FilterRegistrationBean<CustomAuthFilter>()
//        registration.filter = CustomAuthFilter()
//        registration.addUrlPatterns("/*")
//        registration.order = 1 // 控制优先级
//        return registration
//    }
}
